package com.itheima.classabstrac;

import java.util.Scanner;

public class Yuan extends ClassAbstract {
    private Scanner sc=new Scanner(System.in);
    @Override
    public double area() {
        double r;
        System.out.println("圆的半径:");
        r=sc.nextDouble();
        return Math.PI*r*r;
    }

    @Override
    public double zhouChang() {
        double r;
        System.out.println("圆的半径:");
        r=sc.nextDouble();
        return 2*r*Math.PI;
    }
}
